import { baseUrlApi, requestClient } from '#/api/request';

export type SettingResult = {
  code: number;
  data: {
    /** 后台配置 */
    admin_settings: {
      admin_name?: string;
      admin_password?: string;
      admin_style?: string;
      admin_theme?: string;
      isLocal?: boolean;
    };
    /** 后台风格列表 */
    admin_styles: Array<string>;
    /** 后台模板列表 */
    admin_themes: Array<string>;
  };
};

/** 获取后台配置 */
export const getAdminSetting = () => {
  return requestClient.get<SettingResult>(baseUrlApi('/admin/setting/admin'));
};
